<?php

$platformDir='platform';
$appsDir='wechat';

return [
    'enablePrettyUrl' => true,//开启URL美化
    'showScriptName' => false,//禁用index.php文件
    'rules' => [
        
        "" => 'platform/main/index',
        "/" => 'platform/main/index',
        "login" => 'platform/main/login',

        "home" => 'wechat/home/index',        
        "inspector" => 'wechat/inspector/index', 

        "pay/notify" => 'wechat/order/notify',
        "pay/addorder" => 'wechat/order/addorder',
        "pay/order" => 'wechat/order/payorder', 

        "{$appsDir}" => 'wechat/home/index',
        "{$appsDir}/main" => 'wechat/home/index',
        "{$appsDir}/<c:\w+>" => 'wechat/<c>/index',
        "{$appsDir}/<c:\w+>/<a1:[a-z0-9]+>" => 'wechat/<c>/<a1>',
        "{$appsDir}/<c:\w+>/<a1:[a-z0-9]+>-<a2:[a-z0-9]+>" => 'wechat/<c>/<a1>_<a2>',
        "{$appsDir}/<c:\w+>/<a1:[a-z0-9]+>-<a2:[a-z0-9]+>-<a3:[a-z0-9]+>" => 'wechat/<c>/<a1>_<a2>_<a3>',

        "{$platformDir}" => 'platform/main/index',
        "{$platformDir}/e/<code:\d+>" => 'platform/main/error',
        "{$platformDir}/<c:\w+>" => 'platform/<c>/index',
        "{$platformDir}/<c:\w+>/<a1:[a-z0-9]+>" => 'platform/<c>/<a1>',
        "{$platformDir}/<c:\w+>/<a1:[a-z0-9]+>-<a2:[a-z0-9]+>" => 'platform/<c>/<a1>_<a2>',
        "{$platformDir}/<c:\w+>/<a1:[a-z0-9]+>-<a2:[a-z0-9]+>-<a3:[a-z0-9]+>" => 'platform/<c>/<a1>_<a2>_<a3>',
    ]
];
